<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <ul id="list"></ul>
    <script>
        const list = document.getElementById('list');

        function addLi() {
            while (true) {
                const text = prompt();
                if (text === null) break;
                const li = document.createElement('li');
                li.innerHTML = text;
                list.append(li);
            }
        }
        addLi()
    </script>
</body>

</html>